; written in asar 0.50 by alcaro


arch 65816; lorom



org $ffd8

; 32KB = $8000
db $05



org $8097ec
jml sram_save




org $8180fc
jml sram_load




; ############################ ;
; ############################ ;
; ############################ ;
; ############################ ;




org $84ff80


sram_save:

and #$00ff
sta $0310




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




; LOST
lda #$4f4c
sta $700000

lda #$5453
sta $700002




sep #$20

lda $030a
sta $700004

lda $030c
sta $700005

lda $030e
sta $700006

lda $0310
sta $700007

rep #$20



jml $8097f2




; ############################ ;
; ############################ ;
; ############################ ;
; ############################ ;




sram_load:
sta $030e
sta $0310




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




lda $700000
cmp #$4f4c
bne +


lda $700002
cmp #$5453
bne +





sep #$20

lda $700004
sta $30a

lda $700005
sta $30c

lda $700006
sta $30e

lda $700007
sta $310

rep #$20




+
jml $818102






warnpc $850000
